package com.sina.weibo;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Align;
import android.graphics.Path;
import android.graphics.Path.Direction;
import android.graphics.Rect;
import android.graphics.RectF;
import android.net.Uri;
import android.text.Spannable;
import android.text.TextUtils;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.ImageSpan;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.sina.weibo.models.Comment;
import com.sina.weibo.models.CommentMessage;
import com.sina.weibo.models.FavHotWord;
import com.sina.weibo.models.MBlog;
import com.sina.weibo.models.Message;
import com.sina.weibo.models.User;
import com.sina.weibo.models.UserInfo;
import com.sina.weibo.view.EmotionView;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.NoRouteToHostException;
import java.net.SocketTimeoutException;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.text.FieldPosition;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import sudroid.android.FileUtil;

public final class Utils
{
  public static final String AT_FILE = "_at";
  public static final String BLOG_FILE = "/blog.dat";
  static int CACHE_LIMITATION = 0;
  public static final String CAMERA_FILE_CACHE_PREX = "tmp_bmp_";
  public static final String CM_FILE = "_commentmessage";
  public static final int DELETE_FAV = 1;
  public static final int DELETE_MBLOG = 0;
  private static String DES_KEY;
  public static final String DIR_LARGE_IMAGE = "/large_imgs";
  public static final String FAVHOTWORD_FILE = "favhotword";
  public static final String FAVORITE_FILE = "_favorite";
  public static final String HOME_FILE = "_home";
  public static final String HOTFORWARD_FILE = "/hotforward";
  public static final String LOOKAROUND_FILE = "/lookaround";
  public static final String MODE_FILE = "_mode";
  public static final String MSG_FILE = "_message";
  public static final String MYBLOG_FILE = "_myblog";
  private static final int MaxCacheMapSize = 200;
  public static final String PREFS_ISFIRSTLOGIN = "isfirst";
  public static final String PREFS_NAME = "weibo";
  public static final String PREFS_PASSWORD = "password";
  public static final String PREFS_USERNAME = "username";
  private static final int RRB_DEFAULT_SIZE = 6;
  public static final String TOPUSER_FILE = "/topuser";
  public static final String TOTAL_FILE = "_total";
  public static final String UID_FILE = "_uid.dat";
  public static final String USER_FILE = "/user.dat";
  private static Pattern atpattern;
  private static File externalCacheDir;
  private static Pattern filenamepattern;
  private static boolean isLogin = 1;
  public static Object lock;
  private static SinaWeiboDB mDB;
  public static long millisecond8hours;
  private static Paint nbPaint;
  public static Map<String, Bitmap> portraitCacheMap;
  private static Queue<String> portraitQueue;
  private static Path rrbRath;
  private static RectF rrbRectf;
  private static SimpleDateFormat sdf;
  private static Pattern sharppattern;
  private static Pattern webpattern;

  static
  {
    DES_KEY = "sinachina";
    rrbRectf = new RectF();
    rrbRath = new Path();
    nbPaint = new Paint();
    millisecond8hours = 0L;
    portraitCacheMap = new HashMap();
    portraitQueue = new LinkedList();
    lock = new Object();
  }

  public static int[] Byte2Int(byte[] paramArrayOfByte)
  {
    int i = paramArrayOfByte.length / 3;
    int j = paramArrayOfByte.length % 3;
    int[] arrayOfInt;
    int k;
    int m;
    int n;
    int i1;
    int i2;
    if (j == 0)
    {
      arrayOfInt = new int[i];
      k = 0;
      m = 255;
      n = 8;
      i1 = 0;
      if (i1 < i)
        break label63;
      if (j > 0)
        i2 = 0;
    }
    while (true)
    {
      if (i2 >= j)
      {
        return arrayOfInt;
        arrayOfInt = new int[i + 1];
        break;
        label63: int i3 = 0;
        while (true)
        {
          if (i3 >= 3)
          {
            i1 += 1;
            break;
          }
          int i4 = arrayOfInt[i1];
          int i5 = paramArrayOfByte[k];
          int i6 = n * i3;
          int i7 = i5 << i6;
          int i8 = n * i3;
          int i9 = m << i8;
          int i10 = i7 & i9;
          int i11 = i4 | i10;
          arrayOfInt[i1] = i11;
          k += 1;
          i3 += 1;
        }
      }
      int i12 = arrayOfInt[i];
      int i13 = k + i2;
      int i14 = paramArrayOfByte[i13];
      int i15 = n * i2;
      int i16 = i14 << i15;
      int i17 = n * i2;
      int i18 = m << i17;
      int i19 = i16 & i18;
      int i20 = i12 | i19;
      arrayOfInt[i] = i20;
      i2 += 1;
    }
  }

  public static int[] Encode(String paramString)
  {
    try
    {
      byte[] arrayOfByte1 = DES_KEY.getBytes();
      DESKeySpec localDESKeySpec = new DESKeySpec(arrayOfByte1);
      SecretKey localSecretKey = SecretKeyFactory.getInstance("DES").generateSecret(localDESKeySpec);
      Cipher localCipher = Cipher.getInstance("DES");
      localCipher.init(1, localSecretKey);
      byte[] arrayOfByte2 = paramString.getBytes();
      int[] arrayOfInt1 = Byte2Int(localCipher.doFinal(arrayOfByte2));
      arrayOfInt2 = arrayOfInt1;
      return arrayOfInt2;
    }
    catch (Exception localException)
    {
      while (true)
      {
        loge(localException);
        int[] arrayOfInt2 = null;
      }
    }
  }

  public static boolean SetWeiboDB(SinaWeiboDB paramSinaWeiboDB)
  {
    mDB = paramSinaWeiboDB;
    if (mDB != null);
    for (int i = 1; ; i = 0)
      return i;
  }

  public static boolean checkBlogFile(String paramString)
  {
    if (TextUtils.isEmpty(checkCache(paramString, "/blog.dat")));
    for (int i = 0; ; i = 1)
      return i;
  }

  public static String checkCache(String paramString1, String paramString2)
  {
    String str1 = String.valueOf(paramString1);
    StringBuilder localStringBuilder = new StringBuilder(str1).append("/");
    String str2 = MD5.hexdigest(paramString2);
    String str3 = str2;
    String str4 = "——：" + str3;
    int i = Log.d("filepath>>>>%%%>>>", str4);
    if (new File(str3).exists());
    for (String str5 = str3; ; str5 = null)
      return str5;
  }

  public static void cleanAtListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_at";
    boolean bool = new File(str3).delete();
  }

  public static void cleanBlogFile(String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/blog.dat";
    boolean bool = new File(str2).delete();
  }

  public static void cleanCameraBmpCache()
  {
    String str = FileUtil.printSDCardRoot();
    File localFile = new File(str);
    Utils.1 local1 = new Utils.1();
    File[] arrayOfFile = localFile.listFiles(local1);
    int i;
    int j;
    if (arrayOfFile != null)
    {
      i = arrayOfFile.length;
      j = 0;
    }
    while (true)
    {
      if (j >= i)
        return;
      boolean bool = FileUtil.deleteDependon(arrayOfFile[j]);
      j += 1;
    }
  }

  public static void cleanCommentMessageListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_commentmessage";
    boolean bool = new File(str3).delete();
  }

  public static void cleanFavoriteListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_favorite";
    boolean bool = new File(str3).delete();
  }

  public static void cleanHomeListFile(String paramString, User paramUser)
  {
    boolean bool = mDB.deleteAll(0);
  }

  public static void cleanHotForwardListFile(String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/hotforward";
    boolean bool = new File(str2).delete();
  }

  public static void cleanHotWordListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "favhotword";
    boolean bool = new File(str3).delete();
  }

  public static void cleanLookAroundListFile(String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/lookaround";
    boolean bool = new File(str2).delete();
  }

  public static void cleanMessageListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_message";
    boolean bool = new File(str3).delete();
  }

  public static void cleanMyBlogListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_myblog";
    boolean bool = new File(str3).delete();
  }

  public static boolean cleanSearchWordList(String paramString)
  {
    return new File(paramString).delete();
  }

  public static void cleanSubMessageListFile(String paramString1, String paramString2, User paramUser)
  {
    String str1 = String.valueOf(paramString2);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + 95 + paramString1;
    boolean bool = new File(str3).delete();
  }

  public static void cleanTopUserListFile(String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/topuser";
    boolean bool = new File(str2).delete();
  }

  public static void cleanUserFile(String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/user.dat";
    boolean bool = new File(str2).delete();
  }

  private static boolean cleanUsrnameList(String paramString)
  {
    return new File(paramString).delete();
  }

  public static void clearAllLargeImages(Context paramContext)
  {
    String str = String.valueOf(paramContext.getCacheDir().getAbsolutePath());
    FileUtil.deleteFiles(str + "/large_imgs");
  }

  public static void clearCache(File paramFile)
  {
    if (paramFile == null)
      return;
    File[] arrayOfFile;
    int i;
    int j;
    if (paramFile.exists())
      if (paramFile.isDirectory())
      {
        arrayOfFile = paramFile.listFiles();
        i = arrayOfFile.length;
        j = 0;
      }
    while (true)
    {
      if (j >= i)
      {
        if ((!paramFile.isFile()) || (!paramFile.exists()) || (!paramFile.canWrite()))
          break;
        boolean bool1 = paramFile.delete();
        break;
        break;
      }
      File localFile = arrayOfFile[j];
      if ((localFile.exists()) && (localFile.canWrite()))
        boolean bool2 = localFile.delete();
      j += 1;
    }
  }

  public static void clearCacheButUser(File paramFile)
  {
    if (paramFile == null)
      return;
    File[] arrayOfFile;
    int i;
    int j;
    if (paramFile.exists())
      if (paramFile.isDirectory())
      {
        arrayOfFile = paramFile.listFiles();
        i = arrayOfFile.length;
        j = 0;
      }
    while (true)
    {
      if (j >= i)
      {
        if (!paramFile.isFile())
          break;
        if ((paramFile.exists()) && (paramFile.canWrite()))
        {
          String str1 = paramFile.getName();
          String str2 = "/user.dat".substring(1);
          if (!str1.equals(str2))
          {
            StringBuilder localStringBuilder1 = new StringBuilder("delete file:");
            String str3 = paramFile.getName();
            String str4 = str3;
            int k = Log.d("weibo", str4);
          }
        }
        boolean bool1 = paramFile.delete();
        break;
        break;
      }
      File localFile = arrayOfFile[j];
      if ((localFile.exists()) && (localFile.canWrite()))
      {
        String str5 = localFile.getName();
        String str6 = "/user.dat".substring(1);
        if (!str5.equals(str6))
        {
          StringBuilder localStringBuilder2 = new StringBuilder("delete file:");
          String str7 = localFile.getName();
          String str8 = str7;
          int m = Log.d("weibo", str8);
          boolean bool2 = localFile.delete();
        }
      }
      j += 1;
    }
  }

  public static Intent commentComment(Context paramContext, CommentMessage paramCommentMessage)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.COMMENT_COMMENT;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    String str1 = paramCommentMessage.commentid;
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.COMMENT_ID", str1);
    String str2 = paramCommentMessage.commentnick;
    Intent localIntent4 = localIntent1.putExtra("com.sina.weibo.intent.extra.NICKNAME", str2);
    String str3 = paramCommentMessage.commentuid;
    Intent localIntent5 = localIntent1.putExtra("com.sina.weibo.intent.extra.COMMENT_AUTHOR_UID", str3);
    String str4 = paramCommentMessage.mblogid;
    Intent localIntent6 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_ID", str4);
    String str5 = paramCommentMessage.mbloguid;
    Intent localIntent7 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_AUTHOR_UID", str5);
    return localIntent1;
  }

  public static Intent commentComment(Context paramContext, String paramString1, String paramString2, Comment paramComment)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.COMMENT_COMMENT;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    String str1 = paramComment.cmtid;
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.COMMENT_ID", str1);
    String str2 = paramComment.nick;
    Intent localIntent4 = localIntent1.putExtra("com.sina.weibo.intent.extra.NICKNAME", str2);
    String str3 = paramComment.cmtuid;
    Intent localIntent5 = localIntent1.putExtra("com.sina.weibo.intent.extra.COMMENT_AUTHOR_UID", str3);
    Intent localIntent6 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_ID", paramString1);
    Intent localIntent7 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_AUTHOR_UID", paramString2);
    return localIntent1;
  }

  private static int conputingRadius(Paint paramPaint)
  {
    Rect localRect = new Rect();
    int i = "999+".length();
    paramPaint.getTextBounds("999+", 0, i, localRect);
    double d1 = localRect.right;
    double d2 = localRect.bottom;
    return (int)Math.hypot(d1, d2);
  }

  public static CustomToast createProgressCustomToast(int paramInt, Context paramContext)
  {
    return new CustomToast(paramContext, paramInt);
  }

  public static Dialog createProgressDialog(int paramInt1, Activity paramActivity, int paramInt2)
  {
    LinearLayout localLinearLayout = new LinearLayout(paramActivity);
    Dialog localDialog = new Dialog(paramActivity, 2131492867);
    TextView localTextView = setTextView(paramInt1, paramActivity);
    if (paramActivity.getClass() == ImageViewer.class)
      localTextView.setTextColor(-1);
    for (ProgressBar localProgressBar = new ProgressBar(paramActivity, null, 16842873); ; localProgressBar = new ProgressBar(paramActivity, null, 16843400))
    {
      localLinearLayout.addView(localProgressBar);
      localLinearLayout.addView(localTextView);
      localDialog.setContentView(localLinearLayout);
      localDialog.setCancelable(1);
      return localDialog;
    }
  }

  public static Toast createProgressToast(int paramInt, Context paramContext)
  {
    Toast localToast = new Toast(paramContext);
    LinearLayout localLinearLayout = new LinearLayout(paramContext);
    TextView localTextView = setTextView(paramInt, paramContext);
    if (paramContext.getClass() == ImageViewer.class)
      localTextView.setTextColor(-1);
    for (ProgressBar localProgressBar = new ProgressBar(paramContext, null, 16842873); ; localProgressBar = new ProgressBar(paramContext, null, 16843400))
    {
      localLinearLayout.addView(localProgressBar);
      localLinearLayout.addView(localTextView);
      localToast.setView(localLinearLayout);
      localToast.setDuration(0);
      localToast.setGravity(17, 0, 0);
      return localToast;
    }
  }

  public static String dateFormat(long paramLong)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("M-dd HH:mm");
    StringBuffer localStringBuffer1 = new StringBuffer();
    long l1 = millisecond8hours;
    long l2 = paramLong + l1;
    Date localDate = new Date(l2);
    FieldPosition localFieldPosition = new FieldPosition(1);
    StringBuffer localStringBuffer2 = localSimpleDateFormat.format(localDate, localStringBuffer1, localFieldPosition);
    return localStringBuffer1.toString();
  }

  public static boolean deleteCacheItem(Object paramObject, int paramInt, String paramString)
  {
    switch (paramInt)
    {
    default:
    case 0:
    case 1:
    }
    label70: label246: 
    while (true)
    {
      int i = 0;
      return i;
      String str = (String)paramObject;
      if (StaticInfo.mUser != null)
      {
        User localUser1 = StaticInfo.mUser;
        localList = loadHomeListFile(paramString, localUser1);
        if (localList != null)
        {
          j = 0;
          k = localList.size();
          if (j < k)
            break label178;
        }
      }
      str = (String)paramObject;
      if (StaticInfo.mUser == null)
        continue;
      User localUser2 = StaticInfo.mUser;
      List localList = loadFavoriteListFile(paramString, localUser2);
      if (localList == null)
        continue;
      int j = 0;
      int k = localList.size();
      while (true)
      {
        if (j >= k)
          break label246;
        if (((MBlog)localList.get(j)).mblogid.equals(str))
        {
          Object localObject1 = localList.remove(j);
          User localUser3 = StaticInfo.mUser;
          saveFavoriteListFile(localList, paramString, localUser3);
          i = 1;
          break;
          if (((MBlog)localList.get(j)).mblogid.equals(str))
          {
            Object localObject2 = localList.remove(j);
            User localUser4 = StaticInfo.mUser;
            saveHomeListFile(localList, paramString, localUser4);
            i = 1;
            break;
          }
          j += 1;
          break label70;
        }
        j += 1;
      }
    }
  }

  public static Intent editAtBlog(Context paramContext, String paramString)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.AT;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.INIT_TEXT", paramString);
    return localIntent1;
  }

  public static Intent editNewBlog(Context paramContext)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.NEW_BLOG;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    return localIntent1;
  }

  public static Intent editNewBlog(Context paramContext, String paramString)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.NEW_BLOG;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.INIT_TEXT", paramString);
    return localIntent1;
  }

  public static Intent editPrivateMessage(Context paramContext, String paramString)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.PRIVATE_MESSAGE;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.NICKNAME", paramString);
    return localIntent1;
  }

  public static Intent editTopicBlog(Context paramContext, String paramString)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.TOPIC;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.INIT_TEXT", paramString);
    return localIntent1;
  }

  public static String formatDate(Context paramContext, Date paramDate)
  {
    long l1 = new Date().getTime();
    long l2 = paramDate.getTime();
    long l3 = l1 - l2;
    String str1;
    if (l3 > 86400000L)
      str1 = getDateFormat().format(paramDate);
    while (true)
    {
      return str1;
      if (l3 > 3600000L)
      {
        Object[] arrayOfObject1 = new Object[2];
        Long localLong1 = Long.valueOf(l3 / 3600000L);
        arrayOfObject1[0] = localLong1;
        String str2 = paramContext.getString(2131427504);
        arrayOfObject1[1] = str2;
        str1 = String.format("%d%s", arrayOfObject1);
        continue;
      }
      if (l3 > 60000L)
      {
        Object[] arrayOfObject2 = new Object[2];
        Long localLong2 = Long.valueOf(l3 / 60000L);
        arrayOfObject2[0] = localLong2;
        String str3 = paramContext.getString(2131427505);
        arrayOfObject2[1] = str3;
        str1 = String.format("%d%s", arrayOfObject2);
        continue;
      }
      Object[] arrayOfObject3 = new Object[1];
      String str4 = paramContext.getString(2131427505);
      arrayOfObject3[0] = str4;
      str1 = String.format("1%s", arrayOfObject3);
    }
  }

  public static Intent forwardMBlog(Context paramContext, MBlog paramMBlog)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.FORWARD;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    String str1 = paramMBlog.mblogid;
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_ID", str1);
    String str2 = paramMBlog.uid;
    Intent localIntent4 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_AUTHOR_UID", str2);
    if (!TextUtils.isEmpty(paramMBlog.rtreason))
    {
      String str3 = paramMBlog.rtreason;
      Intent localIntent5 = localIntent1.putExtra("com.sina.weibo.intent.extra.FORWARD_REASON", str3);
    }
    String str4 = paramMBlog.nick;
    Intent localIntent6 = localIntent1.putExtra("com.sina.weibo.intent.extra.NICKNAME", str4);
    return localIntent1;
  }

  public static Intent forwardSrcMBlog(Context paramContext, MBlog paramMBlog)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.FORWARD;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    String str1 = paramMBlog.mblogid;
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_ID", str1);
    String str2 = paramMBlog.uid;
    Intent localIntent4 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_AUTHOR_UID", str2);
    String str3 = paramMBlog.nick;
    Intent localIntent5 = localIntent1.putExtra("com.sina.weibo.intent.extra.NICKNAME", str3);
    return localIntent1;
  }

  public static Pattern getAtPattern()
  {
    if (atpattern == null)
    {
      Object[] arrayOfObject = new Object[1];
      String str = getPunctuation();
      arrayOfObject[0] = str;
      atpattern = Pattern.compile(String.format("@[[^@\\s%s]0-9]{1,20}", arrayOfObject));
    }
    return atpattern;
  }

  public static Object[] getAttMBlogList(User paramUser, String paramString, int paramInt1, int paramInt2)
  {
    int i = paramInt1 - 1;
    int j = paramInt2 * i;
    Object[] arrayOfObject = new Object[2];
    ArrayList localArrayList = new ArrayList();
    arrayOfObject[1] = localArrayList;
    List localList = loadHomeListFile(paramString, paramUser);
    int k = 0;
    if (localList != null)
      k = 0;
    while (true)
    {
      if (k < paramInt2)
      {
        int m = j + k;
        int n = localList.size();
        if (m < n);
      }
      else
      {
        Integer localInteger = Integer.valueOf(k);
        arrayOfObject[0] = localInteger;
        return arrayOfObject;
      }
      int i1 = j + k;
      MBlog localMBlog = (MBlog)localList.get(i1);
      boolean bool = localArrayList.add(localMBlog);
      k += 1;
    }
  }

  private static SimpleDateFormat getDateFormat()
  {
    if (sdf == null)
      sdf = new SimpleDateFormat("MM-dd HH:mm");
    return sdf;
  }

  public static File getExternalCacheDir()
  {
    if (FileUtil.hasSDCardMounted())
    {
      if (externalCacheDir == null)
      {
        String str1 = String.valueOf(FileUtil.printSDCardRoot());
        String str2 = str1 + "/sina/weibo";
        externalCacheDir = new File(str2);
      }
      if (!externalCacheDir.exists())
        boolean bool = externalCacheDir.mkdirs();
    }
    for (File localFile = externalCacheDir; ; localFile = null)
      return localFile;
  }

  public static Pattern getFilenamePattern()
  {
    if (filenamepattern == null)
      filenamepattern = Pattern.compile("[^/\\\\<>*?:\"| ]+");
    return filenamepattern;
  }

  public static String getLargeImage(Context paramContext, String paramString, boolean paramBoolean)
  {
    String str1 = paramContext.getString(2131427630);
    if (!paramString.contains(str1))
      throw new RuntimeException("Pls make sure url contains \"wap\" chars.");
    try
    {
      String str2 = String.valueOf(paramContext.getCacheDir().getAbsolutePath());
      String str3 = str2 + "/large_imgs";
      if (!FileUtil.doesExisted(str3))
        boolean bool = new File(str3).mkdirs();
      String str4 = SettingsPref.getDownloadImageSize(paramContext);
      String str5 = paramString.replace(str1, str4);
      String str6 = RPCHelper.getInstance(paramContext).getPicture(str5, str3, paramBoolean);
      str7 = str6;
      return str7;
    }
    catch (RPCHelper.HttpException localHttpException)
    {
      while (true)
      {
        loge(localHttpException);
        String str7 = null;
      }
    }
  }

  public static long getLargeImagesTotalSize(Context paramContext)
  {
    String str = String.valueOf(paramContext.getCacheDir().getAbsolutePath());
    return FileUtil.getFileSize(str + "/large_imgs");
  }

  public static boolean getLoginStatus()
  {
    return isLogin;
  }

  public static Bitmap getPortraitBitmap(String paramString1, String paramString2, ListView paramListView, MBlog paramMBlog, boolean paramBoolean)
  {
    while (true)
    {
      Context localContext;
      Object localObject2;
      Bitmap localBitmap1;
      synchronized (lock)
      {
        localContext = paramListView.getContext();
        localObject2 = null;
        if (!isInCacheMap(paramString1))
          continue;
        localBitmap1 = (Bitmap)portraitCacheMap.get(paramString1);
        if ((localBitmap1 != null) && (!localBitmap1.isRecycled()))
          continue;
        Object localObject3 = portraitCacheMap.remove(paramString1);
        String str1 = checkCache(paramString2, paramString1);
        localBitmap2 = loadFromFile(localContext, str1, paramMBlog, paramString1, paramBoolean);
        return localBitmap2;
        localBitmap2 = localBitmap1;
        continue;
        if (localObject2 == null)
          continue;
        boolean bool1 = "".equals(localObject2);
        localObject2 = checkCache(paramString2, paramString1);
        if (localObject2 != null)
          break label228;
        String str2 = paramString1;
        ListView localListView1 = paramListView;
        String str3 = paramString2;
        MBlog localMBlog1 = paramMBlog;
        boolean bool2 = paramBoolean;
        localBitmap1 = loadFromNet(localContext, str2, localListView1, str3, localMBlog1, bool2);
        if ((localBitmap1 == null) || (localBitmap1.isRecycled()))
        {
          String str4 = paramString1;
          ListView localListView2 = paramListView;
          String str5 = paramString2;
          MBlog localMBlog2 = paramMBlog;
          boolean bool3 = paramBoolean;
          localBitmap2 = loadFromNet(localContext, str4, localListView2, str5, localMBlog2, bool3);
        }
      }
      monitorexit;
      Bitmap localBitmap2 = localBitmap1;
      continue;
      label228: localBitmap2 = loadFromFile(localContext, (String)localObject2, paramMBlog, paramString1, paramBoolean);
      monitorexit;
    }
  }

  public static Bitmap getPreviewBitmap(String paramString1, String paramString2, ListView paramListView, MBlog paramMBlog, boolean paramBoolean)
  {
    while (true)
    {
      Context localContext;
      Object localObject2;
      Bitmap localBitmap1;
      synchronized (lock)
      {
        localContext = paramListView.getContext();
        localObject2 = null;
        if (!isInCacheMap(paramString1))
          continue;
        localBitmap1 = (Bitmap)portraitCacheMap.get(paramString1);
        if ((localBitmap1 != null) && (!localBitmap1.isRecycled()))
          continue;
        Object localObject3 = portraitCacheMap.remove(paramString1);
        String str1 = checkCache(paramString2, paramString1);
        localBitmap2 = loadFromFile(localContext, str1, paramMBlog, paramString1, paramBoolean);
        return localBitmap2;
        localBitmap2 = localBitmap1;
        continue;
        if (localObject2 == null)
          continue;
        boolean bool1 = "".equals(localObject2);
        localObject2 = checkCache(paramString2, paramString1);
        if (localObject2 != null)
          break label228;
        String str2 = paramString1;
        ListView localListView1 = paramListView;
        String str3 = paramString2;
        MBlog localMBlog1 = paramMBlog;
        boolean bool2 = paramBoolean;
        localBitmap1 = loadFromNet(localContext, str2, localListView1, str3, localMBlog1, bool2);
        if ((localBitmap1 == null) || (localBitmap1.isRecycled()))
        {
          String str4 = paramString1;
          ListView localListView2 = paramListView;
          String str5 = paramString2;
          MBlog localMBlog2 = paramMBlog;
          boolean bool3 = paramBoolean;
          localBitmap2 = loadFromNet(localContext, str4, localListView2, str5, localMBlog2, bool3);
        }
      }
      monitorexit;
      Bitmap localBitmap2 = localBitmap1;
      continue;
      label228: localBitmap2 = loadFromFile(localContext, (String)localObject2, paramMBlog, paramString1, paramBoolean);
      monitorexit;
    }
  }

  private static String getPunctuation()
  {
    return "`~!@#\\$%\\^&*()=+\\[\\]{}\\|/\\?<>,\\.:\\u00D7\\u00B7\\u2014-\\u2026\\u3001-\\u3011\\uFE30-\\uFFE5";
  }

  public static Throwable getRootCause(Throwable paramThrowable)
  {
    Object localObject;
    if (paramThrowable == null)
    {
      localObject = null;
      return localObject;
    }
    Throwable localThrowable1 = paramThrowable.getCause();
    Throwable localThrowable2 = localThrowable1;
    label15: if (localThrowable1 == null)
      if (localThrowable2 != null)
        break label42;
    label42: for (Throwable localThrowable3 = paramThrowable; ; localThrowable3 = localThrowable2)
    {
      localObject = localThrowable3;
      break;
      localThrowable2 = localThrowable1;
      localThrowable1 = localThrowable1.getCause();
      break label15;
    }
  }

  private static Pattern getSharpPattern()
  {
    if (sharppattern == null)
      sharppattern = Pattern.compile("#[^#]+?#");
    return sharppattern;
  }

  static Pattern getWebPattern()
  {
    if (webpattern == null)
      webpattern = Pattern.compile("http[s]*://[[[^/:]&&[a-zA-Z_0-9]]\\.]+(:\\d+)?(/[a-zA-Z_0-9]+)*(/[a-zA-Z_0-9]*([a-zA-Z_0-9]+\\.[a-zA-Z_0-9]+)*)?(\\?(&?[a-zA-Z_0-9]+=[%[a-zA-Z_0-9]-]*)*)*(#[[a-zA-Z_0-9]|-]+)?");
    return webpattern;
  }

  public static void highlightContent(Context paramContext, Spannable paramSpannable)
  {
    Matcher localMatcher = getAtPattern().matcher(paramSpannable);
    if (!localMatcher.find())
    {
      localMatcher = getWebPattern().matcher(paramSpannable);
      label23: if (localMatcher.find())
        break label205;
      localMatcher = getSharpPattern().matcher(paramSpannable);
      label38: if (localMatcher.find())
        break label246;
      localMatcher = Pattern.compile("\\[(\\S+?)\\]").matcher(paramSpannable);
    }
    while (true)
    {
      if (!localMatcher.find())
      {
        return;
        int i = localMatcher.start();
        int j = localMatcher.end();
        logd("start:" + i + " end:" + j);
        StringBuilder localStringBuilder = new StringBuilder("str:");
        CharSequence localCharSequence = paramSpannable.subSequence(i, j);
        logd(localCharSequence);
        if (j - i == 2)
        {
          int k = i + 1;
          if (paramSpannable.charAt(k) == 25105);
        }
        else
        {
          if (j - i <= 2)
            break;
        }
        ForegroundColorSpan localForegroundColorSpan1 = new ForegroundColorSpan(-15050856);
        paramSpannable.setSpan(localForegroundColorSpan1, i, j, 33);
        break;
        label205: ForegroundColorSpan localForegroundColorSpan2 = new ForegroundColorSpan(-15050856);
        int m = localMatcher.start();
        int n = localMatcher.end();
        paramSpannable.setSpan(localForegroundColorSpan2, m, n, 33);
        break label23;
        label246: ForegroundColorSpan localForegroundColorSpan3 = new ForegroundColorSpan(-15050856);
        int i1 = localMatcher.start();
        int i2 = localMatcher.end();
        paramSpannable.setSpan(localForegroundColorSpan3, i1, i2, 33);
        break label38;
      }
      HashMap localHashMap = EmotionView.emotionsKeyString;
      String str = localMatcher.group(1);
      Integer localInteger = (Integer)localHashMap.get(str);
      if ((localInteger == null) || (localInteger.intValue() <= 0))
        continue;
      int i3 = localMatcher.start();
      int i4 = localMatcher.end();
      int i5 = localInteger.intValue();
      ImageSpan localImageSpan = new ImageSpan(paramContext, i5);
      paramSpannable.setSpan(localImageSpan, i3, i4, 33);
    }
  }

  public static void highlightContentClickable(Context paramContext, Spannable paramSpannable, String paramString)
  {
    Matcher localMatcher = getAtPattern().matcher(paramSpannable);
    if (!localMatcher.find())
    {
      localMatcher = getSharpPattern().matcher(paramSpannable);
      label23: if (localMatcher.find())
        break label192;
      localMatcher = getWebPattern().matcher(paramSpannable);
      label38: if (localMatcher.find())
        break label291;
      localMatcher = Pattern.compile("\\[(\\S+?)\\]").matcher(paramSpannable);
    }
    while (true)
    {
      if (!localMatcher.find())
      {
        return;
        i = localMatcher.start();
        j = localMatcher.end();
        if (j - i == 2)
        {
          int k = i + 1;
          if (paramSpannable.charAt(k) == 25105);
        }
        else
        {
          if (j - i <= 2)
            break;
        }
        ForegroundColorSpan localForegroundColorSpan1 = new ForegroundColorSpan(-15050856);
        paramSpannable.setSpan(localForegroundColorSpan1, i, j, 33);
        int m = i + 1;
        String str1 = paramSpannable.subSequence(m, j).toString();
        AtClicker localAtClicker = new AtClicker(str1);
        paramSpannable.setSpan(localAtClicker, i, j, 33);
        break;
        label192: int n = localMatcher.start();
        int i1 = localMatcher.end();
        ForegroundColorSpan localForegroundColorSpan2 = new ForegroundColorSpan(-15050856);
        paramSpannable.setSpan(localForegroundColorSpan2, n, i1, 33);
        int i2 = n + 1;
        int i3 = i1 - 1;
        String str2 = paramSpannable.subSequence(i2, i3).toString().trim();
        TopicClicker localTopicClicker = new TopicClicker(str2);
        paramSpannable.setSpan(localTopicClicker, n, i1, 33);
        break label23;
        label291: int i4 = localMatcher.start();
        int i5 = localMatcher.end();
        ForegroundColorSpan localForegroundColorSpan3 = new ForegroundColorSpan(-15050856);
        paramSpannable.setSpan(localForegroundColorSpan3, i4, i5, 33);
        String str3 = paramSpannable.subSequence(i4, i5).toString().trim();
        UrlClicker localUrlClicker = new UrlClicker(str3, paramString);
        paramSpannable.setSpan(localUrlClicker, i4, i5, 33);
        break label38;
      }
      int i = localMatcher.start();
      int j = localMatcher.end();
      HashMap localHashMap = EmotionView.emotionsKeyString;
      String str4 = localMatcher.group(1);
      Integer localInteger = (Integer)localHashMap.get(str4);
      if ((localInteger == null) || (localInteger.intValue() <= 0))
        continue;
      int i6 = localInteger.intValue();
      ImageSpan localImageSpan = new ImageSpan(paramContext, i6);
      paramSpannable.setSpan(localImageSpan, i, j, 33);
    }
  }

  // ERROR //
  private static boolean isInCacheMap(String paramString)
  {
    // Byte code:
    //   0: getstatic 162	com/sina/weibo/Utils:lock	Ljava/lang/Object;
    //   3: astore_1
    //   4: aload_1
    //   5: monitorenter
    //   6: aload_0
    //   7: ifnonnull +9 -> 16
    //   10: aload_1
    //   11: monitorexit
    //   12: aconst_null
    //   13: astore_1
    //   14: aload_1
    //   15: ireturn
    //   16: getstatic 154	com/sina/weibo/Utils:portraitCacheMap	Ljava/util/Map;
    //   19: aload_0
    //   20: invokeinterface 759 2 0
    //   25: checkcast 761	android/graphics/Bitmap
    //   28: ifnonnull +10 -> 38
    //   31: aload_1
    //   32: monitorexit
    //   33: aconst_null
    //   34: astore_1
    //   35: goto -21 -> 14
    //   38: aload_1
    //   39: monitorexit
    //   40: aconst_null
    //   41: astore_1
    //   42: goto -28 -> 14
    //   45: astore_2
    //   46: aload_1
    //   47: monitorexit
    //   48: aload_2
    //   49: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   10	45	45	finally
  }

  // ERROR //
  private static Object load(String paramString)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_1
    //   2: new 263	java/io/File
    //   5: dup
    //   6: aload_0
    //   7: invokespecial 264	java/io/File:<init>	(Ljava/lang/String;)V
    //   10: astore_2
    //   11: aload_2
    //   12: invokevirtual 268	java/io/File:exists	()Z
    //   15: ifeq +74 -> 89
    //   18: new 896	java/io/FileInputStream
    //   21: dup
    //   22: aload_2
    //   23: invokespecial 898	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   26: astore_3
    //   27: new 900	java/io/ObjectInputStream
    //   30: dup
    //   31: aload_3
    //   32: invokespecial 903	java/io/ObjectInputStream:<init>	(Ljava/io/InputStream;)V
    //   35: astore 4
    //   37: aload 4
    //   39: invokevirtual 907	java/io/ObjectInputStream:readObject	()Ljava/lang/Object;
    //   42: astore 5
    //   44: aload 5
    //   46: astore_1
    //   47: aload 4
    //   49: invokevirtual 910	java/io/ObjectInputStream:close	()V
    //   52: aload_1
    //   53: astore 6
    //   55: aload 6
    //   57: areturn
    //   58: astore 7
    //   60: aload 7
    //   62: invokestatic 210	com/sina/weibo/Utils:loge	(Ljava/lang/Throwable;)V
    //   65: goto -18 -> 47
    //   68: astore 7
    //   70: aconst_null
    //   71: astore 6
    //   73: aload 7
    //   75: invokestatic 210	com/sina/weibo/Utils:loge	(Ljava/lang/Throwable;)V
    //   78: goto -23 -> 55
    //   81: astore 7
    //   83: aload_1
    //   84: astore 6
    //   86: goto -13 -> 73
    //   89: aconst_null
    //   90: astore 6
    //   92: goto -37 -> 55
    //
    // Exception table:
    //   from	to	target	type
    //   37	44	58	java/lang/ClassNotFoundException
    //   18	37	68	java/io/IOException
    //   37	44	68	java/io/IOException
    //   60	65	68	java/io/IOException
    //   47	52	81	java/io/IOException
  }

  public static List<MBlog> loadAtListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "_at");
  }

  public static String loadBlogFile(String paramString)
  {
    String str = String.valueOf(paramString);
    return (String)load(str + "/blog.dat");
  }

  public static List<CommentMessage> loadCommentMessageListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "_commentmessage");
  }

  public static List<MBlog> loadFavoriteListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "_favorite");
  }

  public static Bitmap loadFromFile(Context paramContext, String paramString1, MBlog paramMBlog, String paramString2, boolean paramBoolean)
  {
    synchronized (lock)
    {
      Bitmap localBitmap1 = BitmapFactory.decodeFile(paramString1);
      if (!paramBoolean);
      Bitmap localBitmap2;
      for (??? = localBitmap1; ; ??? = localBitmap2)
      {
        return ???;
        if ((localBitmap1 == null) || (localBitmap1.isRecycled()))
          break;
        boolean bool1 = paramMBlog.vip;
        localBitmap2 = outputBmp(paramContext, localBitmap1, bool1);
        putCacheMap(paramString2, localBitmap2);
      }
      File localFile = new File(paramString1);
      if (localFile.canWrite())
        boolean bool2 = localFile.delete();
      ??? = null;
    }
  }

  // ERROR //
  public static Bitmap loadFromNet(Context paramContext, String paramString1, ListView paramListView, String paramString2, MBlog paramMBlog, boolean paramBoolean)
  {
    // Byte code:
    //   0: getstatic 162	com/sina/weibo/Utils:lock	Ljava/lang/Object;
    //   3: astore 6
    //   5: aload 6
    //   7: monitorenter
    //   8: aconst_null
    //   9: astore 7
    //   11: aload_0
    //   12: invokestatic 733	com/sina/weibo/RPCHelper:getInstance	(Landroid/content/Context;)Lcom/sina/weibo/RPCHelper;
    //   15: aload_1
    //   16: invokevirtual 936	com/sina/weibo/RPCHelper:getPictureByte	(Ljava/lang/String;)[B
    //   19: astore 8
    //   21: aload 8
    //   23: arraylength
    //   24: istore 9
    //   26: aload 8
    //   28: iconst_0
    //   29: iload 9
    //   31: invokestatic 940	android/graphics/BitmapFactory:decodeByteArray	([BII)Landroid/graphics/Bitmap;
    //   34: astore 10
    //   36: iload 5
    //   38: ifne +21 -> 59
    //   41: aload 8
    //   43: aload_1
    //   44: aload_3
    //   45: invokestatic 944	com/sina/weibo/Utils:savePictureLocal	([BLjava/lang/String;Ljava/lang/String;)V
    //   48: aload 6
    //   50: monitorexit
    //   51: iconst_0
    //   52: astore 11
    //   54: aload 10
    //   56: astore_1
    //   57: aload_1
    //   58: areturn
    //   59: aload 10
    //   61: ifnull +15 -> 76
    //   64: aload 10
    //   66: invokevirtual 764	android/graphics/Bitmap:isRecycled	()Z
    //   69: istore 12
    //   71: iload 12
    //   73: ifeq +14 -> 87
    //   76: aload 6
    //   78: monitorexit
    //   79: aconst_null
    //   80: astore_1
    //   81: iconst_0
    //   82: astore 13
    //   84: goto -27 -> 57
    //   87: aload_2
    //   88: invokevirtual 947	android/widget/ListView:getFirstVisiblePosition	()I
    //   91: istore 14
    //   93: aload_2
    //   94: invokevirtual 950	android/widget/ListView:getChildCount	()I
    //   97: istore 5
    //   99: iconst_0
    //   100: istore 15
    //   102: iload 15
    //   104: iload 5
    //   106: if_icmplt +23 -> 129
    //   109: aload 8
    //   111: aload_1
    //   112: aload_3
    //   113: invokestatic 944	com/sina/weibo/Utils:savePictureLocal	([BLjava/lang/String;Ljava/lang/String;)V
    //   116: aload 6
    //   118: monitorexit
    //   119: aload 7
    //   121: astore 16
    //   123: aload 7
    //   125: astore_1
    //   126: goto -69 -> 57
    //   129: aload_2
    //   130: iload 15
    //   132: invokevirtual 954	android/widget/ListView:getChildAt	(I)Landroid/view/View;
    //   135: instanceof 956
    //   138: ifne +12 -> 150
    //   141: iload 15
    //   143: iconst_1
    //   144: iadd
    //   145: istore 15
    //   147: goto -45 -> 102
    //   150: aload_2
    //   151: iload 15
    //   153: invokevirtual 954	android/widget/ListView:getChildAt	(I)Landroid/view/View;
    //   156: checkcast 956	com/sina/weibo/view/MBlogListItemView
    //   159: getfield 960	com/sina/weibo/view/MBlogListItemView:mBlog	Lcom/sina/weibo/models/MBlog;
    //   162: getfield 963	com/sina/weibo/models/MBlog:portrait	Ljava/lang/String;
    //   165: aload_1
    //   166: invokevirtual 361	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   169: ifeq -28 -> 141
    //   172: aload 4
    //   174: getfield 924	com/sina/weibo/models/MBlog:vip	Z
    //   177: istore 17
    //   179: aload_0
    //   180: aload 10
    //   182: iload 17
    //   184: invokestatic 928	com/sina/weibo/Utils:outputBmp	(Landroid/content/Context;Landroid/graphics/Bitmap;Z)Landroid/graphics/Bitmap;
    //   187: astore 7
    //   189: aload_1
    //   190: aload 7
    //   192: invokestatic 932	com/sina/weibo/Utils:putCacheMap	(Ljava/lang/String;Landroid/graphics/Bitmap;)V
    //   195: goto -54 -> 141
    //   198: astore_0
    //   199: aload 7
    //   201: astore_1
    //   202: ldc 69
    //   204: ldc_w 965
    //   207: aload_0
    //   208: invokestatic 969	android/util/Log:e	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    //   211: istore 18
    //   213: aload 6
    //   215: monitorexit
    //   216: aload_1
    //   217: astore 19
    //   219: aconst_null
    //   220: astore_1
    //   221: aload 19
    //   223: astore 20
    //   225: goto -168 -> 57
    //   228: astore_1
    //   229: aload 7
    //   231: astore 21
    //   233: aload 6
    //   235: monitorexit
    //   236: aload_1
    //   237: athrow
    //   238: astore 22
    //   240: aload_1
    //   241: astore 23
    //   243: aload 22
    //   245: astore_1
    //   246: goto -13 -> 233
    //   249: astore_1
    //   250: goto -17 -> 233
    //
    // Exception table:
    //   from	to	target	type
    //   11	48	198	java/lang/Exception
    //   64	71	198	java/lang/Exception
    //   87	116	198	java/lang/Exception
    //   129	195	198	java/lang/Exception
    //   11	48	228	finally
    //   48	51	228	finally
    //   64	71	228	finally
    //   76	79	228	finally
    //   87	116	228	finally
    //   116	119	228	finally
    //   129	195	228	finally
    //   202	216	238	finally
    //   233	236	249	finally
  }

  public static List<MBlog> loadHomeListFile(String paramString, User paramUser)
  {
    if (mDB == null);
    for (List localList = null; ; localList = (List)mDB.select(0))
      return localList;
  }

  public static List<MBlog> loadHotForwardListFile(String paramString)
  {
    String str = String.valueOf(paramString);
    return (List)load(str + "/hotforward");
  }

  public static List<FavHotWord> loadHotWordListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "favhotword");
  }

  public static List<MBlog> loadLookAroundListFile(String paramString)
  {
    String str = String.valueOf(paramString);
    return (List)load(str + "/lookaround");
  }

  public static List<Message> loadMessageListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "_message");
  }

  public static int loadModeFile(String paramString, User paramUser)
  {
    int i = 0;
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    Integer localInteger = (Integer)load(str2 + "_mode");
    if (localInteger != null)
      i = localInteger.intValue();
    if (i > 8)
      i = 0;
    return i;
  }

  public static List<MBlog> loadMyBlogListFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (List)load(str2 + "_myblog");
  }

  public static Set<String> loadSearchWordList(String paramString)
  {
    return (Set)load(paramString);
  }

  public static Object[] loadSubMessageListFile(String paramString1, String paramString2, User paramUser)
  {
    String str1 = String.valueOf(paramString2);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    Object localObject = load(str2 + 95 + paramString1);
    if ((localObject instanceof Object[]));
    for (Object[] arrayOfObject = (Object[])localObject; ; arrayOfObject = null)
      return arrayOfObject;
  }

  public static List<UserInfo> loadTopUserListFile(String paramString)
  {
    String str = String.valueOf(paramString);
    return (List)load(str + "/topuser");
  }

  public static int[] loadTotalFile(String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    return (int[])load(str2 + "_total");
  }

  public static User loadUserFile(String paramString)
  {
    String str = String.valueOf(paramString);
    return (User)load(str + "/user.dat");
  }

  public static Set<String> loadUsrnameList(String paramString)
  {
    return (Set)load(paramString);
  }

  public static void logd(CharSequence paramCharSequence)
  {
    if (!TextUtils.isEmpty(paramCharSequence))
    {
      String str = paramCharSequence.toString();
      int i = Log.d("weibo", str);
    }
  }

  public static void loge(CharSequence paramCharSequence)
  {
    if (!TextUtils.isEmpty(paramCharSequence))
    {
      String str = paramCharSequence.toString();
      int i = Log.e("weibo", str);
    }
  }

  public static void loge(Throwable paramThrowable)
  {
    if (paramThrowable != null)
      int i = Log.e("weibo", "", paramThrowable);
  }

  public static Bitmap outputBmp(Context paramContext, Bitmap paramBitmap, boolean paramBoolean)
  {
    Bitmap localBitmap1;
    Bitmap localBitmap3;
    if (paramBoolean)
    {
      localBitmap1 = BitmapFactory.decodeResource(paramContext.getResources(), 2130838137);
      paramBoolean = null;
      paramContext = 6;
      if ((paramBitmap == null) || (paramContext <= 0))
        break label370;
      int i = paramBitmap.getWidth();
      int j = paramBitmap.getHeight();
      Bitmap.Config localConfig1 = Bitmap.Config.ARGB_4444;
      Bitmap localBitmap2 = Bitmap.createBitmap(i, j, localConfig1);
      Canvas localCanvas1 = new Canvas(localBitmap2);
      rrbRath.reset();
      RectF localRectF1 = rrbRectf;
      float f1 = i;
      float f2 = j;
      localRectF1.set(0.0F, 0.0F, f1, f2);
      Path localPath1 = rrbRath;
      RectF localRectF2 = rrbRectf;
      float f3 = paramContext;
      float f4 = paramContext;
      Path.Direction localDirection = Path.Direction.CW;
      localPath1.addRoundRect(localRectF2, f3, f4, localDirection);
      Path localPath2 = rrbRath;
      boolean bool1 = localCanvas1.clipPath(localPath2);
      Paint localPaint1 = new Paint(1);
      localCanvas1.drawBitmap(paramBitmap, 0.0F, 0.0F, localPaint1);
      if ((localBitmap2 == null) || (localBitmap1 == null))
        break label366;
      int k = localBitmap2.getWidth();
      int m = localBitmap2.getHeight();
      int n = localBitmap1.getWidth();
      int i1 = localBitmap1.getHeight();
      int i2 = n / 2 + k;
      int i3 = i1 / 2 + m;
      Bitmap.Config localConfig2 = Bitmap.Config.ARGB_4444;
      localBitmap3 = Bitmap.createBitmap(i2, i3, localConfig2);
      localBitmap3.eraseColor(0);
      Canvas localCanvas2 = new Canvas(localBitmap3);
      Paint localPaint2 = new Paint(1);
      localCanvas2.drawBitmap(localBitmap2, 0.0F, 0.0F, localPaint2);
      int i4 = n / 2;
      float f5 = k - i4;
      int i5 = i1 / 2;
      float f6 = m - i5;
      Paint localPaint3 = new Paint(1);
      localCanvas2.drawBitmap(localBitmap1, f5, f6, localPaint3);
      localBitmap2.recycle();
      localBitmap1.recycle();
    }
    for (paramBitmap = localBitmap3; ; paramBitmap = paramBoolean)
    {
      return paramBitmap;
      localBitmap1 = BitmapFactory.decodeResource(paramContext.getResources(), 2130838102);
      break;
      label366: paramBitmap.recycle();
      label370: boolean bool2 = paramBoolean;
    }
  }

  public static Bitmap outputCoverBmp(Context paramContext, Bitmap paramBitmap)
  {
    Bitmap localBitmap = BitmapFactory.decodeResource(paramContext.getResources(), 2130838137);
    return outputCoverBmp(outputRoundRectBitmap(paramBitmap), localBitmap);
  }

  public static Bitmap outputCoverBmp(Bitmap paramBitmap1, Bitmap paramBitmap2)
  {
    Bitmap localBitmap1;
    if ((paramBitmap1 != null) && (paramBitmap2 != null))
    {
      int i = paramBitmap1.getWidth();
      int j = paramBitmap1.getHeight();
      int k = paramBitmap2.getWidth();
      int m = paramBitmap2.getHeight();
      int n = k / 2 + i;
      int i1 = m / 2 + j;
      Bitmap.Config localConfig = Bitmap.Config.ARGB_4444;
      localBitmap1 = Bitmap.createBitmap(n, i1, localConfig);
      localBitmap1.eraseColor(0);
      Canvas localCanvas = new Canvas(localBitmap1);
      Paint localPaint1 = new Paint(1);
      localCanvas.drawBitmap(paramBitmap1, 0.0F, 0.0F, localPaint1);
      int i2 = k / 2;
      float f1 = i - i2;
      int i3 = m / 2;
      float f2 = j - i3;
      Paint localPaint2 = new Paint(1);
      localCanvas.drawBitmap(paramBitmap2, f1, f2, localPaint2);
      paramBitmap1.recycle();
      paramBitmap2.recycle();
    }
    for (Bitmap localBitmap2 = localBitmap1; ; localBitmap2 = null)
      return localBitmap2;
  }

  public static void outputLogger(String paramString)
  {
    if (FileUtil.hasSDCardMounted());
    while (true)
    {
      return;
      File localFile1 = getExternalCacheDir();
      File localFile2 = new File(localFile1, "logger.txt");
      if (!localFile2.getParentFile().exists())
        boolean bool = localFile2.mkdirs();
      try
      {
        byte[] arrayOfByte = paramString.getBytes();
        FileOutputStream localFileOutputStream = new FileOutputStream(localFile2, 1);
        localFileOutputStream.write(arrayOfByte);
        localFileOutputStream.close();
      }
      catch (IOException localIOException)
      {
        localIOException.printStackTrace();
      }
    }
  }

  public static Bitmap outputNumberBitmap(Bitmap paramBitmap, int paramInt)
  {
    Bitmap localBitmap1;
    String str;
    if ((paramBitmap != null) && (paramInt > 0))
    {
      int i = paramBitmap.getHeight();
      int j = paramBitmap.getWidth();
      Bitmap.Config localConfig = Bitmap.Config.ARGB_4444;
      localBitmap1 = Bitmap.createBitmap(j, i, localConfig);
      nbPaint.setTextSize(10.0F);
      int k = (int)nbPaint.descent();
      int m = conputingRadius(nbPaint);
      Canvas localCanvas = new Canvas(localBitmap1);
      Paint localPaint1 = nbPaint;
      localCanvas.drawBitmap(paramBitmap, 0.0F, 0.0F, localPaint1);
      nbPaint.setColor(-65536);
      float f1 = j - m;
      float f2 = i - m;
      float f3 = m;
      Paint localPaint2 = nbPaint;
      localCanvas.drawCircle(f1, f2, f3, localPaint2);
      Paint localPaint3 = nbPaint;
      Paint.Align localAlign = Paint.Align.CENTER;
      localPaint3.setTextAlign(localAlign);
      if (paramInt > 999)
      {
        str = "999+";
        nbPaint.setColor(-1);
        float f4 = j - m;
        float f5 = i - m + k;
        Paint localPaint4 = nbPaint;
        localCanvas.drawText(str, f4, f5, localPaint4);
      }
    }
    for (Bitmap localBitmap2 = localBitmap1; ; localBitmap2 = null)
    {
      return localBitmap2;
      str = String.valueOf(paramInt);
      break;
    }
  }

  public static Bitmap outputRoundRectBitmap(Bitmap paramBitmap)
  {
    return outputRoundRectBitmap(paramBitmap, 6);
  }

  private static Bitmap outputRoundRectBitmap(Bitmap paramBitmap, int paramInt)
  {
    Bitmap localBitmap1;
    if ((paramBitmap != null) && (paramInt > 0))
    {
      int i = paramBitmap.getWidth();
      int j = paramBitmap.getHeight();
      Bitmap.Config localConfig = Bitmap.Config.ARGB_4444;
      localBitmap1 = Bitmap.createBitmap(i, j, localConfig);
      Canvas localCanvas = new Canvas(localBitmap1);
      rrbRath.reset();
      RectF localRectF1 = rrbRectf;
      float f1 = i;
      float f2 = j;
      localRectF1.set(0.0F, 0.0F, f1, f2);
      Path localPath1 = rrbRath;
      RectF localRectF2 = rrbRectf;
      float f3 = paramInt;
      float f4 = paramInt;
      Path.Direction localDirection = Path.Direction.CW;
      localPath1.addRoundRect(localRectF2, f3, f4, localDirection);
      Path localPath2 = rrbRath;
      boolean bool = localCanvas.clipPath(localPath2);
      Paint localPaint = new Paint(1);
      localCanvas.drawBitmap(paramBitmap, 0.0F, 0.0F, localPaint);
      paramBitmap.recycle();
    }
    for (Bitmap localBitmap2 = localBitmap1; ; localBitmap2 = null)
      return localBitmap2;
  }

  private static void putCacheMap(String paramString, Bitmap paramBitmap)
  {
    synchronized (lock)
    {
      if (isInCacheMap(paramString))
        return;
      if (portraitCacheMap.size() <= 200)
        break label108;
      boolean bool1 = portraitQueue.add(paramString);
      if (portraitQueue.size() > 0);
    }
    String str = (String)portraitQueue.remove();
    Bitmap localBitmap = (Bitmap)portraitCacheMap.remove(str);
    Object localObject3 = portraitCacheMap.put(paramString, paramBitmap);
    while (true)
    {
      monitorexit;
      break;
      label108: Object localObject4 = portraitCacheMap.put(paramString, paramBitmap);
      boolean bool2 = portraitQueue.add(paramString);
    }
  }

  private static void save(Object paramObject, String paramString)
  {
    try
    {
      FileOutputStream localFileOutputStream = new FileOutputStream(paramString);
      ObjectOutputStream localObjectOutputStream = new ObjectOutputStream(localFileOutputStream);
      localObjectOutputStream.writeObject(paramObject);
      localObjectOutputStream.flush();
      localObjectOutputStream.close();
      return;
    }
    catch (IOException localIOException)
    {
      while (true)
        loge(localIOException);
    }
  }

  public static void saveAtListFile(List<MBlog> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "_at";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "_at";
      save(paramList, str6);
    }
  }

  public static void saveBlogFile(String paramString1, String paramString2)
  {
    String str1 = String.valueOf(paramString2);
    String str2 = str1 + "/blog.dat";
    save(paramString1, str2);
  }

  public static void saveCommentMessageListFile(List<CommentMessage> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "_commentmessage";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "_commentmessage";
      save(paramList, str6);
    }
  }

  public static void saveFavoriteListFile(List<MBlog> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "_favorite";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "_favorite";
      save(paramList, str6);
    }
  }

  public static void saveHomeListFile(List<MBlog> paramList, String paramString, User paramUser)
  {
    boolean bool1 = mDB.deleteAll(0);
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool2 = localArrayList.addAll(localList);
      boolean bool3 = mDB.insert(localArrayList, 0);
    }
    while (true)
    {
      return;
      boolean bool4 = mDB.insert(paramList, 0);
    }
  }

  public static void saveHotForwardListFile(List<MBlog> paramList, String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/hotforward";
    save(paramList, str2);
  }

  public static void saveHotWordListFile(List<FavHotWord> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "favhotword";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "favhotword";
      save(paramList, str6);
    }
  }

  public static void saveLookAroundListFile(List<MBlog> paramList, String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/lookaround";
    save(paramList, str2);
  }

  public static void saveMessageListFile(List<Message> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "_message";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "_message";
      save(paramList, str6);
    }
  }

  public static void saveModeFile(int paramInt, String paramString, User paramUser)
  {
    Integer localInteger = new Integer(paramInt);
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_mode";
    save(localInteger, str3);
  }

  public static void saveMyBlogListFile(List<MBlog> paramList, String paramString, User paramUser)
  {
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      String str1 = String.valueOf(paramString);
      StringBuilder localStringBuilder1 = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + "_myblog";
      save(localArrayList, str3);
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(paramString);
      StringBuilder localStringBuilder2 = new StringBuilder(str4).append(47);
      String str5 = paramUser.uid;
      String str6 = str5 + "_myblog";
      save(paramList, str6);
    }
  }

  // ERROR //
  public static void savePictureLocal(byte[] paramArrayOfByte, String paramString1, String paramString2)
    throws RPCHelper.ApiException, IOException
  {
    // Byte code:
    //   0: getstatic 162	com/sina/weibo/Utils:lock	Ljava/lang/Object;
    //   3: astore_3
    //   4: aload_3
    //   5: monitorenter
    //   6: aload_0
    //   7: ifnull +8 -> 15
    //   10: aload_0
    //   11: arraylength
    //   12: ifgt +6 -> 18
    //   15: aload_3
    //   16: monitorexit
    //   17: return
    //   18: aload_1
    //   19: ifnull +27 -> 46
    //   22: ldc_w 772
    //   25: aload_1
    //   26: invokevirtual 361	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   29: ifne +17 -> 46
    //   32: aload_2
    //   33: ifnull +13 -> 46
    //   36: ldc_w 772
    //   39: aload_2
    //   40: invokevirtual 361	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   43: ifeq +15 -> 58
    //   46: aload_3
    //   47: monitorexit
    //   48: goto -31 -> 17
    //   51: astore 4
    //   53: aload_3
    //   54: monitorexit
    //   55: aload 4
    //   57: athrow
    //   58: aload_1
    //   59: invokestatic 247	com/sina/weibo/MD5:hexdigest	(Ljava/lang/String;)Ljava/lang/String;
    //   62: astore 5
    //   64: aload_2
    //   65: invokestatic 230	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   68: astore 6
    //   70: new 232	java/lang/StringBuilder
    //   73: dup
    //   74: aload 6
    //   76: invokespecial 235	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   79: ldc 237
    //   81: invokevirtual 241	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   84: aload 5
    //   86: invokevirtual 241	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   89: invokevirtual 251	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   92: astore 7
    //   94: new 263	java/io/File
    //   97: dup
    //   98: aload 7
    //   100: invokespecial 264	java/io/File:<init>	(Ljava/lang/String;)V
    //   103: astore 8
    //   105: aconst_null
    //   106: astore 9
    //   108: aload 8
    //   110: invokevirtual 268	java/io/File:exists	()Z
    //   113: ifeq +18 -> 131
    //   116: aload 8
    //   118: invokevirtual 349	java/io/File:canWrite	()Z
    //   121: ifeq +10 -> 131
    //   124: aload 8
    //   126: invokevirtual 282	java/io/File:delete	()Z
    //   129: istore 10
    //   131: new 1084	java/io/FileOutputStream
    //   134: dup
    //   135: aload 8
    //   137: invokespecial 1190	java/io/FileOutputStream:<init>	(Ljava/io/File;)V
    //   140: astore 11
    //   142: aload 11
    //   144: aload_0
    //   145: invokevirtual 1090	java/io/FileOutputStream:write	([B)V
    //   148: aload 11
    //   150: invokevirtual 1191	java/io/FileOutputStream:flush	()V
    //   153: aload 11
    //   155: invokevirtual 1091	java/io/FileOutputStream:close	()V
    //   158: aload_3
    //   159: monitorexit
    //   160: goto -143 -> 17
    //   163: astore 12
    //   165: aload 9
    //   167: ifnull +8 -> 175
    //   170: aload 9
    //   172: invokevirtual 1091	java/io/FileOutputStream:close	()V
    //   175: new 1189	com/sina/weibo/RPCHelper$ApiException
    //   178: dup
    //   179: ldc_w 1193
    //   182: aload 12
    //   184: invokespecial 1196	com/sina/weibo/RPCHelper$ApiException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   187: athrow
    //   188: astore 12
    //   190: aload 11
    //   192: astore 9
    //   194: goto -29 -> 165
    //
    // Exception table:
    //   from	to	target	type
    //   10	51	51	finally
    //   58	105	51	finally
    //   108	142	51	finally
    //   142	158	51	finally
    //   158	188	51	finally
    //   108	142	163	java/io/IOException
    //   142	158	188	java/io/IOException
  }

  public static void saveSearchWordList(String paramString, Set<String> paramSet)
  {
    boolean bool = cleanSearchWordList(paramString);
    save(paramSet, paramString);
  }

  public static void saveSubMessageListFile(List<Message> paramList, int paramInt, String paramString1, String paramString2, User paramUser)
  {
    Object[] arrayOfObject = new Object[2];
    int i = paramList.size();
    int j = CACHE_LIMITATION;
    if (i > j)
    {
      ArrayList localArrayList = new ArrayList();
      int k = CACHE_LIMITATION - 1;
      List localList = paramList.subList(0, k);
      boolean bool = localArrayList.addAll(localList);
      Integer localInteger1 = Integer.valueOf(paramInt);
      arrayOfObject[0] = localInteger1;
      arrayOfObject[1] = localArrayList;
    }
    while (true)
    {
      String str1 = String.valueOf(paramString2);
      StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
      String str2 = paramUser.uid;
      String str3 = str2 + 95 + paramString1;
      save(arrayOfObject, str3);
      return;
      Integer localInteger2 = Integer.valueOf(paramInt);
      arrayOfObject[0] = localInteger2;
      arrayOfObject[1] = paramList;
    }
  }

  public static void saveTopUserListFile(List<UserInfo> paramList, String paramString)
  {
    String str1 = String.valueOf(paramString);
    String str2 = str1 + "/topuser";
    save(paramList, str2);
  }

  public static void saveTotalFile(int[] paramArrayOfInt, String paramString, User paramUser)
  {
    String str1 = String.valueOf(paramString);
    StringBuilder localStringBuilder = new StringBuilder(str1).append(47);
    String str2 = paramUser.uid;
    String str3 = str2 + "_total";
    save(paramArrayOfInt, str3);
  }

  public static void saveUserFile(User paramUser, String paramString, Context paramContext)
  {
    if (paramUser == null);
    while (true)
    {
      return;
      String str1 = String.valueOf(paramString);
      String str2 = str1 + "/user.dat";
      save(paramUser, str2);
    }
  }

  public static void saveUsrnameList(String paramString, Set<String> paramSet)
  {
    boolean bool = cleanUsrnameList(paramString);
    save(paramSet, paramString);
  }

  public static Intent sendFeedback(Context paramContext)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.FEEDBACK;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    return localIntent1;
  }

  public static void setLoginStatus(boolean paramBoolean)
  {
    isLogin = paramBoolean;
  }

  public static TextView setTextView(int paramInt, Context paramContext)
  {
    TextView localTextView = new TextView(paramContext);
    localTextView.setText(paramInt);
    localTextView.setGravity(17);
    localTextView.setTextSize(13.0F);
    localTextView.setPadding(15, 0, 15, 0);
    localTextView.setTextColor(-16777216);
    return localTextView;
  }

  public static Intent simpleComment(Context paramContext, String paramString1, String paramString2)
  {
    Context localContext = paramContext.getApplicationContext();
    Intent localIntent1 = new Intent(localContext, EditActivity.class);
    EditActivity.LauchMode localLauchMode = EditActivity.LauchMode.SIMPLE_COMMENT;
    Intent localIntent2 = localIntent1.putExtra("com.sina.weibo.intent.extra.LAUCH_MODE", localLauchMode);
    Intent localIntent3 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_ID", paramString1);
    Intent localIntent4 = localIntent1.putExtra("com.sina.weibo.intent.extra.MBLOG_AUTHOR_UID", paramString2);
    return localIntent1;
  }

  public static String translationThrowable(Context paramContext, Throwable paramThrowable)
  {
    paramThrowable = getRootCause(paramThrowable);
    String str3;
    if ((paramThrowable instanceof RPCHelper.ApiException))
    {
      String str1 = paramThrowable.getMessage();
      if (str1.contains(":"))
      {
        int i = str1.indexOf(":");
        String str2 = str1.substring(i);
      }
      str3 = str1;
    }
    while (true)
    {
      return str3;
      if ((paramThrowable instanceof RPCHelper.NoSignalException))
      {
        str3 = paramContext.getString(2131427723);
        continue;
      }
      if ((paramThrowable instanceof NoRouteToHostException))
      {
        str3 = paramContext.getString(2131427717);
        continue;
      }
      if ((paramThrowable instanceof SocketTimeoutException))
      {
        str3 = paramContext.getString(2131427718);
        continue;
      }
      if ((paramThrowable instanceof UnknownHostException))
      {
        str3 = paramContext.getString(2131427719);
        continue;
      }
      if ((paramThrowable instanceof IOException))
      {
        str3 = paramContext.getString(2131427720);
        continue;
      }
      if (paramThrowable.getMessage() == null)
      {
        str3 = paramContext.getString(2131427721);
        continue;
      }
      str3 = paramThrowable.getMessage();
    }
  }

  public static String trim(String paramString)
  {
    StringBuilder localStringBuilder1;
    int i;
    if ((paramString != null) && (paramString.length() != 0))
    {
      localStringBuilder1 = new StringBuilder();
      i = 0;
      int j = paramString.length();
      if (i < j);
    }
    for (String str = String.valueOf(localStringBuilder1.toString()); ; str = paramString)
    {
      return str;
      if (paramString.charAt(i) != 32)
      {
        char c = paramString.charAt(i);
        StringBuilder localStringBuilder2 = localStringBuilder1.append(c);
      }
      i += 1;
      break;
    }
  }

  class AtClicker extends ClickableSpan
  {
    private String nickName;

    public AtClicker(String arg2)
    {
      Object localObject;
      this.nickName = localObject;
    }

    public void onClick(View paramView)
    {
      Context localContext = Utils.this;
      Intent localIntent1 = new Intent(localContext, UserInfoActivity2.class);
      String str1 = this.nickName;
      Intent localIntent2 = localIntent1.putExtra("nick", str1);
      String str2 = StaticInfo.mUser.uid;
      Intent localIntent3 = localIntent1.putExtra("myuid", str2);
      Intent localIntent4 = localIntent1.putExtra("vip", 1);
      Utils.this.startActivity(localIntent1);
    }
  }

  class TopicClicker extends ClickableSpan
  {
    private String topic;

    public TopicClicker(String arg2)
    {
      Object localObject;
      this.topic = localObject;
    }

    public void onClick(View paramView)
    {
      Context localContext = Utils.this;
      Intent localIntent1 = new Intent(localContext, UserTopicAttentionList.class);
      String str = this.topic;
      Intent localIntent2 = localIntent1.putExtra("query", str);
      Utils.this.startActivity(localIntent1);
    }
  }

  class UrlClicker extends ClickableSpan
  {
    private static final String URL_PREX = "http://t.sina.cn/dpool/ttt/sinaurlc.php?vt=3&u=%s&gsid=%s";
    private String gsid;
    private String urlPath;

    public UrlClicker(String paramString1, String arg3)
    {
      this.urlPath = paramString1;
      Object localObject;
      this.gsid = localObject;
    }

    public void onClick(View paramView)
    {
      Intent localIntent1 = new Intent("android.intent.action.VIEW");
      Object[] arrayOfObject = new Object[2];
      String str1 = URLEncoder.encode(this.urlPath);
      arrayOfObject[0] = str1;
      String str2 = this.gsid;
      arrayOfObject[1] = str2;
      Uri localUri = Uri.parse(String.format("http://t.sina.cn/dpool/ttt/sinaurlc.php?vt=3&u=%s&gsid=%s", arrayOfObject));
      Intent localIntent2 = localIntent1.setData(localUri);
      Utils.this.startActivity(localIntent1);
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.Utils
 * JD-Core Version:    0.6.0
 */